Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(search): fixing pages not loading after search #416

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Piotr1215
Copy link
Contributor

@Piotr1215 Piotr1215 commented Jan 9, 2025

Content Description

When search results lead to the 0.19 version, the page is no correctly loaded. What happens is that the search result shows "page not found" and only after refresh, the page is loaded.

Using the externalUrlRegex to load all the searches related to the 0.19 version in a separate window, using window.location.href results in the search on 0.19 to load correctly.

The drawback of this is that search results for 0.19 load a bit slower because they need to render in a separate window.

Test the PR

To test the change go to the preview link and insert serach for "synced resources", the top search should take you to the 0.19 docs opening in new tab/window (depending on your browser configuraiton).

Searches for the current version should render normally on the same page.

Preview Link

What are virtual clusters?

Internal Reference

Closes DOC-380

When search results lead to the `0.19` version, the page is no correctly
loaded. What happens is that the search result shows "page not found"
and only after refresh, the page is loaded.

Using the `externalUrlRegex to load all the searches related to the
`0.19` version in a separate window using `window.location.href` results
in the search on `0.19` to load correctly.

The drawback of this is that search results for `0.19` load a bit slower
because they need to render in a separate window.
Copy link

netlify bot commented Jan 9, 2025

Deploy Preview for vcluster-docs-site ready!

Name Link
🔨 Latest commit a7b9da1
🔍 Latest deploy log https://app.netlify.com/sites/vcluster-docs-site/deploys/677f9e3b906eee000859dd72
😎 Deploy Preview https://deploy-preview-416--vcluster-docs-site.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

URL style vs path style is recommended by docusaurus to avoid broken
links
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant